package com.zllkj.mm.adapter

import android.util.Log
import androidx.appcompat.widget.AppCompatImageView
import androidx.appcompat.widget.AppCompatTextView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.zllkj.mm.R
import com.zllkj.mm.common.ClientConfig
import com.zllkj.mm.module.goods.vm.ItemCollectionsVM
import com.zllkj.mm.module.shopping.vm.ItemAfterSaleListVM
import com.zllkj.mm.util.common.PictureLoadUtil
import java.math.BigDecimal

class CollectionListAdapter(layoutResId: Int, data: List<ItemCollectionsVM?>?) :
        BaseQuickAdapter<ItemCollectionsVM, BaseViewHolder>(layoutResId, data) {
    override fun convert(baseViewHolder: BaseViewHolder, vm: ItemCollectionsVM) {
        Log.d("acthome","-->" +vm.name)
        baseViewHolder.getView<AppCompatTextView>(R.id.tv_mycollection_each_one_goods_name).text = vm.name
        baseViewHolder.getView<AppCompatTextView>(R.id.tv_mycollection_each_one_goods_price).text = vm.unitPrice
        PictureLoadUtil.loadPic(baseViewHolder.getView<AppCompatImageView>(R.id.iv_mycollection_each_one_goods_image),vm.pic)

    }
}